Skip to content

chore: add CI workflows, LICENSE, phpstan fixes#2

Merged
gin0115 merged 1 commit intomasterfrom
feat/ci-and-license
Apr 26, 2026
Merged

chore: add CI workflows, LICENSE, phpstan fixes#2
gin0115 merged 1 commit intomasterfrom
feat/ci-and-license

Conversation

@gin0115
Copy link
Copy Markdown
Contributor

@gin0115 gin0115 commented Apr 26, 2026

Ship-readiness scaffolding for elm-mount.

CI (.github/workflows/):

  • WP_6_6.yaml, WP_6_7.yaml, WP_6_8.yaml — PHP 8.0–8.4 matrix; runs composer all
  • WP_6_9.yaml — same matrix, plus Codecov upload using the MOUNT_CODECOV secret
  • All workflows mirror the Perique convention (Enqueue/Nonce style) verbatim

Files:

  • LICENSE — MIT, matching the Nonce/Perique-Route template
  • tests/.env_sample — committed template; tests/.env added to .gitignore

Code:

  • Standard_Flags::current_user() — drop three unreachable defensive checks flagged by phpstan -l max:
    • `! $user` is dead (wp_get_current_user never returns null per stubs)
    • `is_array($user->allcaps)` is dead ($allcaps is array)
    • `array_values(array_keys(...))` is redundant — array_keys already returns a sequential list

composer all (phpunit + phpstan level max + phpcs WordPress-Extra) is green locally: 23 tests, 0 phpstan errors, 0 phpcs violations.

Ship-readiness scaffolding for elm-mount.

CI (.github/workflows/):
- WP_6_6.yaml, WP_6_7.yaml, WP_6_8.yaml — PHP 8.0–8.4 matrix; runs composer all
- WP_6_9.yaml — same matrix, plus Codecov upload using the MOUNT_CODECOV secret
- All workflows mirror the Perique convention (Enqueue/Nonce style) verbatim

Files:
- LICENSE — MIT, matching the Nonce/Perique-Route template
- tests/.env_sample — committed template; tests/.env added to .gitignore

Code:
- Standard_Flags::current_user() — drop three unreachable defensive checks
  flagged by phpstan -l max:
    * \`! \$user\` is dead (wp_get_current_user never returns null per stubs)
    * \`is_array(\$user->allcaps)\` is dead (\$allcaps is array<bool>)
    * \`array_values(array_keys(...))\` is redundant — array_keys already
      returns a sequential list

composer all (phpunit + phpstan level max + phpcs WordPress-Extra) is green
locally: 23 tests, 0 phpstan errors, 0 phpcs violations.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@gin0115 gin0115 merged commit 48b4be0 into master Apr 26, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant